<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArSimpleConnector Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArSimpleConnector.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArSimpleConnector-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArSimpleConnector Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Legacy connector for robot and laser.  
 <a href="classArSimpleConnector.html#details">More...</a></p>

<p><code>#include &lt;ArSimpleConnector.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab4188b05ada67f6cafd91761670b7453"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab4188b05ada67f6cafd91761670b7453"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#ab4188b05ada67f6cafd91761670b7453">ArSimpleConnector</a> (int *argc, char **argv)</td></tr>
<tr class="memdesc:ab4188b05ada67f6cafd91761670b7453"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor that takes args from the main. <br /></td></tr>
<tr class="separator:ab4188b05ada67f6cafd91761670b7453"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea9b070b8443f8a552392b79bf3d684c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#aea9b070b8443f8a552392b79bf3d684c">ArSimpleConnector</a> (<a class="el" href="classArArgumentBuilder.html">ArArgumentBuilder</a> *arguments)</td></tr>
<tr class="memdesc:aea9b070b8443f8a552392b79bf3d684c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor that takes argument builder.  <a href="#aea9b070b8443f8a552392b79bf3d684c">More...</a><br /></td></tr>
<tr class="separator:aea9b070b8443f8a552392b79bf3d684c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3dd61eecd30c41ec938284efccc5f30"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#aa3dd61eecd30c41ec938284efccc5f30">ArSimpleConnector</a> (<a class="el" href="classArArgumentParser.html">ArArgumentParser</a> *parser)</td></tr>
<tr class="memdesc:aa3dd61eecd30c41ec938284efccc5f30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor that takes argument parser.  <a href="#aa3dd61eecd30c41ec938284efccc5f30">More...</a><br /></td></tr>
<tr class="separator:aa3dd61eecd30c41ec938284efccc5f30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85761d7cdcf48ba601c728496dfe3964"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#a85761d7cdcf48ba601c728496dfe3964">connectLaser</a> (<a class="el" href="classArSick.html">ArSick</a> *laser)</td></tr>
<tr class="memdesc:a85761d7cdcf48ba601c728496dfe3964"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects the laser synchronously (will take up to a minute)  <a href="#a85761d7cdcf48ba601c728496dfe3964">More...</a><br /></td></tr>
<tr class="separator:a85761d7cdcf48ba601c728496dfe3964"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b6d553c617f1b6d507fc89678e3b6ad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7b6d553c617f1b6d507fc89678e3b6ad"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#a7b6d553c617f1b6d507fc89678e3b6ad">connectLaserArbitrary</a> (<a class="el" href="classArSick.html">ArSick</a> *laser, int laserNumber)</td></tr>
<tr class="memdesc:a7b6d553c617f1b6d507fc89678e3b6ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects the laser synchronously (make sure you setMaxNumLasers) <br /></td></tr>
<tr class="separator:a7b6d553c617f1b6d507fc89678e3b6ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aecf2650aabb8fa3c48aed82b947a4a81"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#aecf2650aabb8fa3c48aed82b947a4a81">connectRobot</a> (<a class="el" href="classArRobot.html">ArRobot</a> *robot)</td></tr>
<tr class="memdesc:aecf2650aabb8fa3c48aed82b947a4a81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets up the robot then connects it.  <a href="#aecf2650aabb8fa3c48aed82b947a4a81">More...</a><br /></td></tr>
<tr class="separator:aecf2650aabb8fa3c48aed82b947a4a81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4998a1a457f0a953849163b2e5db1c8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#ac4998a1a457f0a953849163b2e5db1c8">connectSecondLaser</a> (<a class="el" href="classArSick.html">ArSick</a> *laser)</td></tr>
<tr class="memdesc:ac4998a1a457f0a953849163b2e5db1c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects the laser synchronously (will take up to a minute)  <a href="#ac4998a1a457f0a953849163b2e5db1c8">More...</a><br /></td></tr>
<tr class="separator:ac4998a1a457f0a953849163b2e5db1c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae740e5c073af8db20af761c13766463d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae740e5c073af8db20af761c13766463d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#ae740e5c073af8db20af761c13766463d">logOptions</a> (void) const </td></tr>
<tr class="memdesc:ae740e5c073af8db20af761c13766463d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Log the options the simple connector has. <br /></td></tr>
<tr class="separator:ae740e5c073af8db20af761c13766463d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a303f50f91f8a9867910ba8bc7b0056cb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a303f50f91f8a9867910ba8bc7b0056cb"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#a303f50f91f8a9867910ba8bc7b0056cb">parseArgs</a> (void)</td></tr>
<tr class="memdesc:a303f50f91f8a9867910ba8bc7b0056cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to parse the arguments given in the constructor. <br /></td></tr>
<tr class="separator:a303f50f91f8a9867910ba8bc7b0056cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18eb8c75fbc8c54fe64baccebee85847"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#a18eb8c75fbc8c54fe64baccebee85847">parseArgs</a> (<a class="el" href="classArArgumentParser.html">ArArgumentParser</a> *parser)</td></tr>
<tr class="memdesc:a18eb8c75fbc8c54fe64baccebee85847"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to parse the arguments given in an arbitrary parser.  <a href="#a18eb8c75fbc8c54fe64baccebee85847">More...</a><br /></td></tr>
<tr class="separator:a18eb8c75fbc8c54fe64baccebee85847"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55c08728c7817e35981011a747dc1583"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a55c08728c7817e35981011a747dc1583"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#a55c08728c7817e35981011a747dc1583">setMaxNumLasers</a> (int maxNumLasers=1)</td></tr>
<tr class="memdesc:a55c08728c7817e35981011a747dc1583"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the number of possible lasers. <br /></td></tr>
<tr class="separator:a55c08728c7817e35981011a747dc1583"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65077c5b87275de54ea7cb05b4c7121b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#a65077c5b87275de54ea7cb05b4c7121b">setupLaser</a> (<a class="el" href="classArSick.html">ArSick</a> *laser)</td></tr>
<tr class="memdesc:a65077c5b87275de54ea7cb05b4c7121b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets up the laser to be connected.  <a href="#a65077c5b87275de54ea7cb05b4c7121b">More...</a><br /></td></tr>
<tr class="separator:a65077c5b87275de54ea7cb05b4c7121b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac15f90959219be4fc3a6221f8099d675"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac15f90959219be4fc3a6221f8099d675"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#ac15f90959219be4fc3a6221f8099d675">setupLaserArbitrary</a> (<a class="el" href="classArSick.html">ArSick</a> *laser, int laserNumber)</td></tr>
<tr class="memdesc:ac15f90959219be4fc3a6221f8099d675"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets up a laser t obe connected (make sure you setMaxNumLasers) <br /></td></tr>
<tr class="separator:ac15f90959219be4fc3a6221f8099d675"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae25aab0550fe6c3207241a9d1860efb5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#ae25aab0550fe6c3207241a9d1860efb5">setupRobot</a> (<a class="el" href="classArRobot.html">ArRobot</a> *robot)</td></tr>
<tr class="memdesc:ae25aab0550fe6c3207241a9d1860efb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets up the robot to be connected.  <a href="#ae25aab0550fe6c3207241a9d1860efb5">More...</a><br /></td></tr>
<tr class="separator:ae25aab0550fe6c3207241a9d1860efb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4161136f6399573219692d14ded88be0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#a4161136f6399573219692d14ded88be0">setupSecondLaser</a> (<a class="el" href="classArSick.html">ArSick</a> *laser)</td></tr>
<tr class="memdesc:a4161136f6399573219692d14ded88be0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets up a second laser to be connected.  <a href="#a4161136f6399573219692d14ded88be0">More...</a><br /></td></tr>
<tr class="separator:a4161136f6399573219692d14ded88be0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a865a60557398a4510e2947c898fd31b1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a865a60557398a4510e2947c898fd31b1"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#a865a60557398a4510e2947c898fd31b1">~ArSimpleConnector</a> (void)</td></tr>
<tr class="memdesc:a865a60557398a4510e2947c898fd31b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a865a60557398a4510e2947c898fd31b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a90907ee4d33f076fae4de9adfefb40b3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a90907ee4d33f076fae4de9adfefb40b3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSimpleConnector.html#a90907ee4d33f076fae4de9adfefb40b3">finishConstructor</a> (void)</td></tr>
<tr class="memdesc:a90907ee4d33f076fae4de9adfefb40b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finishes the stuff the constructor needs to do. <br /></td></tr>
<tr class="separator:a90907ee4d33f076fae4de9adfefb40b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a3faa6fd9ffe36d7d1645539de13a52c4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3faa6fd9ffe36d7d1645539de13a52c4"></a>
<a class="el" href="classArLaserConnector.html">ArLaserConnector</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myLaserConnector</b></td></tr>
<tr class="separator:a3faa6fd9ffe36d7d1645539de13a52c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a380a456d10fd34ddd4502bc942f63a8f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a380a456d10fd34ddd4502bc942f63a8f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myOwnParser</b></td></tr>
<tr class="separator:a380a456d10fd34ddd4502bc942f63a8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8ea0103980a7db9a2eabaec0ad607a0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa8ea0103980a7db9a2eabaec0ad607a0"></a>
<a class="el" href="classArArgumentParser.html">ArArgumentParser</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myParser</b></td></tr>
<tr class="separator:aa8ea0103980a7db9a2eabaec0ad607a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d93a3828e7080fe180ace434ee9fe85"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1d93a3828e7080fe180ace434ee9fe85"></a>
<a class="el" href="classArRobotConnector.html">ArRobotConnector</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myRobotConnector</b></td></tr>
<tr class="separator:a1d93a3828e7080fe180ace434ee9fe85"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Legacy connector for robot and laser. </p>
<p>This is deprecated but is left in for compatibility with old code, Instead use <a class="el" href="classArRobotConnector.html" title="Connect to robot or simulator based on program command line parameters. ">ArRobotConnector</a> to set up <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a>'s connection to the robot, and <a class="el" href="classArLaserConnector.html" title="Create laser interface objects (for any kind of laser supported by ARIA) and connect to lasers based ...">ArLaserConnector</a> to set up connections with laser rangefinder devices.</p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000061">Deprecated:</a></b></dt><dd>Use <a class="el" href="classArRobotConnector.html" title="Connect to robot or simulator based on program command line parameters. ">ArRobotConnector</a> and <a class="el" href="classArLaserConnector.html" title="Create laser interface objects (for any kind of laser supported by ARIA) and connect to lasers based ...">ArLaserConnector</a> instead </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="armExample_8cpp-example.html#_a1">armExample.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aea9b070b8443f8a552392b79bf3d684c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArSimpleConnector::ArSimpleConnector </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArArgumentBuilder.html">ArArgumentBuilder</a> *&#160;</td>
          <td class="paramname"><em>builder</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor that takes argument builder. </p>
<dl class="section warning"><dt>Warning</dt><dd>do not delete <em>builder</em> during the lifetime of this <a class="el" href="classArSimpleConnector.html" title="Legacy connector for robot and laser. ">ArSimpleConnector</a>, which may need to access its contents later. </dd></dl>

</div>
</div>
<a class="anchor" id="aa3dd61eecd30c41ec938284efccc5f30"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArSimpleConnector::ArSimpleConnector </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArArgumentParser.html">ArArgumentParser</a> *&#160;</td>
          <td class="paramname"><em>parser</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor that takes argument parser. </p>
<dl class="section warning"><dt>Warning</dt><dd>do not delete <em>parser</em> during the lifetime of this <a class="el" href="classArSimpleConnector.html" title="Legacy connector for robot and laser. ">ArSimpleConnector</a>, which may need to access its contents later. </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a85761d7cdcf48ba601c728496dfe3964"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSimpleConnector::connectLaser </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArSick.html">ArSick</a> *&#160;</td>
          <td class="paramname"><em>laser</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connects the laser synchronously (will take up to a minute) </p>
<p>This will setup and connect the laser if the command line switch was given to do so or simply return true if no connection was wanted. </p>

</div>
</div>
<a class="anchor" id="aecf2650aabb8fa3c48aed82b947a4a81"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSimpleConnector::connectRobot </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArRobot.html">ArRobot</a> *&#160;</td>
          <td class="paramname"><em>robot</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets up the robot then connects it. </p>
<p>Prepares the given <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> object for connection, then begins a blocking connection attempt.</p>
<p>If you wish to simply prepare the <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> object, but not begin the connection, then use <a class="el" href="classArSimpleConnector.html#ae25aab0550fe6c3207241a9d1860efb5" title="Sets up the robot to be connected. ">setupRobot()</a>. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="armExample_8cpp-example.html#a9">armExample.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac4998a1a457f0a953849163b2e5db1c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSimpleConnector::connectSecondLaser </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArSick.html">ArSick</a> *&#160;</td>
          <td class="paramname"><em>laser</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connects the laser synchronously (will take up to a minute) </p>
<p>This will setup and connect the laser if the command line switch was given to do so or simply return true if no connection was requested. </p>

</div>
</div>
<a class="anchor" id="a18eb8c75fbc8c54fe64baccebee85847"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSimpleConnector::parseArgs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArArgumentParser.html">ArArgumentParser</a> *&#160;</td>
          <td class="paramname"><em>parser</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function to parse the arguments given in an arbitrary parser. </p>
<p>Parse command line arguments held by the given <a class="el" href="classArArgumentParser.html" title="Parse and store program command-line arguments for use by other ARIA classes. ">ArArgumentParser</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>true if the arguments were parsed successfully false if not</dd></dl>
<p>The following arguments are used for the robot connection:</p>
<dl>
<dt><code>-robotPort</code> <em>port</em> </dt>
<dd></dd>
<dt><code>-rp</code> <em>port</em> </dt>
<dd><p class="startdd">Use the given serial port device name for a serial port connection (e.g. <code>COM1</code>, or <code>/dev/ttyS0</code> if on Linux.) The default is the first serial port, or COM1, which is the typical Pioneer setup. </p>
<p class="enddd"></p>
</dd>
<dt><code>-remoteHost</code> <em>hostname</em> </dt>
<dd></dd>
<dt><code>-rh</code> <em>hostname</em> </dt>
<dd><p class="startdd">Use a TCP connection to a remote computer with the given network host name instead of a serial port connection</p>
<p class="enddd"></p>
</dd>
<dt><code>-remoteRobotTcpPort</code> <em>port</em> </dt>
<dd></dd>
<dt><code>-rrtp</code> <em>port</em> </dt>
<dd><p class="startdd">Use the given TCP port number if connecting to a remote robot using TCP due to <code>-remoteHost</code> having been given.</p>
<p class="enddd"></p>
</dd>
<dt><code>-remoteIsSim</code> </dt>
<dd></dd>
<dt><code>-ris</code> </dt>
<dd><p class="startdd">The remote TCP robot given by <code>-remoteHost</code> or <code>-rh</code> is actually a simulator. Use any alternative behavior intended for the simulator (e.g. tell the laser device object to request laser data from the simulator rather than trying to connect to a real laser device on the local computer)</p>
<p class="enddd"></p>
</dd>
<dt><code>-robotBaud</code> <em>baudrate</em> </dt>
<dd></dd>
<dt><code>-rb</code> <em>baudrate</em> </dt>
<dd>Use the given baud rate when connecting over a serial port, instead of trying to use the normal rate. </dd>
</dl>
<p>The following arguments are accepted for laser connections. A program may request support for more than one laser using <a class="el" href="classArSimpleConnector.html#a55c08728c7817e35981011a747dc1583" title="Sets the number of possible lasers. ">setMaxNumLasers()</a>; if multi-laser support is enabled in this way, then these arguments must have the laser index number appended. For example, "-laserPort" for laser 1 would instead by "-laserPort1", and for laser 2 it would be "-laserPort2".</p>
<dl>
<dt>-laserPort <em>port</em> </dt>
<dd></dd>
<dt>-lp <em>port</em> </dt>
<dd><p class="startdd">Use the given port device name when connecting to a laser. For example, <code>COM2</code> or on Linux, <code>/dev/ttyS1</code>. The default laser port is COM2, which is the typical Pioneer laser port setup. </p>
<p class="enddd"></p>
</dd>
<dt>-laserFlipped <em>true|false</em> </dt>
<dd></dd>
<dt>-lf <em>true|false</em> </dt>
<dd><p class="startdd">If <code>true</code>, then the laser is mounted upside-down on the robot and the ordering of readings should be reversed.</p>
<p class="enddd"></p>
</dd>
<dt>-connectLaser </dt>
<dd></dd>
<dt>-cl </dt>
<dd><p class="startdd">Explicitly request that the client program connect to a laser, if it does not always do so</p>
<p class="enddd"></p>
</dd>
<dt>-laserPowerControlled <em>true|false</em> </dt>
<dd></dd>
<dt>-lpc <em>true|false</em> </dt>
<dd><p class="startdd">If <code>true</code>, then the laser is powered on when the serial port is initially opened, so enable certain features when connecting such as a waiting period as the laser initializes.</p>
<p class="enddd"></p>
</dd>
<dt>-laserDegrees <em>degrees</em> </dt>
<dd></dd>
<dt>-ld <em>degrees</em> </dt>
<dd><p class="startdd">Indicate the size of the laser field of view, either <code>180</code> (default) or <code>100</code>.</p>
<p class="enddd"></p>
</dd>
<dt>-laserIncrement <em>increment</em> </dt>
<dd></dd>
<dt>-li <em>increment</em> </dt>
<dd><p class="startdd">Configures the laser's angular resolution. If <code>one</code>, then configure the laser to take a reading every degree. If <code>half</code>, then configure it for a reading every 1/2 degrees.</p>
<p class="enddd"></p>
</dd>
<dt>-laserUnits <em>units</em> </dt>
<dd></dd>
<dt>-lu <em>units</em> </dt>
<dd><p class="startdd">Configures the laser's range resolution. May be 1mm for one milimiter, 1cm for ten milimeters, or 10cm for one hundred milimeters.</p>
<p class="enddd"></p>
</dd>
<dt>-laserReflectorBits <em>bits</em> </dt>
<dd></dd>
<dt>-lrb <em>bits</em> </dt>
<dd>Enables special reflectance detection, and configures the granularity of reflector detection information. Using more bits allows the laser to provide values for several different reflectance levels, but also may force a reduction in range. (Note, the SICK LMS-200 only detects high reflectance on special reflector material manufactured by SICK.)  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a65077c5b87275de54ea7cb05b4c7121b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSimpleConnector::setupLaser </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArSick.html">ArSick</a> *&#160;</td>
          <td class="paramname"><em>laser</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets up the laser to be connected. </p>
<p>Description of the logic for connection to the laser: If &ndash;remoteHost then the laser will a tcp connection will be opened to that remoteHost at port 8102 or &ndash;remoteLaserTcpPort if that argument is given, if this connection fails then the setup fails.</p>
<p>If &ndash;remoteHost wasn't provided and the robot connected to a simulator as described elsewhere then the laser is just configured to be simulated, if the robot isn't connected to a simulator it tries to open a serial connection to <a class="el" href="classArUtil.html#a32000b7eb4342c9b94728ef372ba6b44" title="Third serial port device name (value depends on compilation platform) ">ArUtil::COM3</a> or &ndash;laserPort if that argument is given. </p>

</div>
</div>
<a class="anchor" id="ae25aab0550fe6c3207241a9d1860efb5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSimpleConnector::setupRobot </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArRobot.html">ArRobot</a> *&#160;</td>
          <td class="paramname"><em>robot</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets up the robot to be connected. </p>
<p>This method is normally used internally by <a class="el" href="classArSimpleConnector.html#aecf2650aabb8fa3c48aed82b947a4a81" title="Sets up the robot then connects it. ">connectRobot()</a>, but you may use it if you wish.</p>
<p>If -remoteHost was given, then open that TCP port. If it was not given, then try to open a TCP port to the simulator on localhost. If that fails, then use a local serial port connection. Sets the given <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a>'s device connection pointer to this object. Sets up internal settings determined by command line arguments such as serial port and baud rate, etc.</p>
<p>After calling this function (and it returns true), then you may connect <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> to the robot using <a class="el" href="classArRobot.html#abc322326500b02e3e6e0bcaf7bf88d5f" title="Connects to a robot, not returning until connection made or failed. ">ArRobot::blockingConnect()</a> (or similar).</p>
<dl class="section return"><dt>Returns</dt><dd>false if -remoteHost was given and there was an error connecting to the remote host, true otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="a4161136f6399573219692d14ded88be0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSimpleConnector::setupSecondLaser </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArSick.html">ArSick</a> *&#160;</td>
          <td class="paramname"><em>laser</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets up a second laser to be connected. </p>
<p>Description of the logic for connecting to a second laser: Given the fact that there are no parameters for the location of a second laser, the laser's port must be passed in to <a class="el" href="classArSimpleConnector.html" title="Legacy connector for robot and laser. ">ArSimpleConnector</a> from the main or from <a class="el" href="classArArgumentBuilder.html" title="This class is to build arguments for things that require argc and argv. ">ArArgumentBuilder</a>.</p>
<p>Similarly, a tcp connection must be explicitly defined with the &ndash;remoteLaserTcpPort2 argument. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArSimpleConnector.h</li>
<li>ArSimpleConnector.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArSimpleConnector.html">ArSimpleConnector</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
